import Index from "../pages/Index.vue";
import TeamPage from "../pages/TeamPage.vue";
import UserPage from "../pages/UserPage.vue";
import SearchPage from "../pages/SearchPage.vue";
import UserEditPage from "../pages/UserEditPage.vue";
import SearchPageResult from "../pages/SearchPageResult.vue";
import LoginPage from "../pages/LoginPage.vue";
import BasicLayout from "../layouts/BasicLayout.vue";
import MyAddTeamPage from "../pages/MyAddTeamPage.vue";
import MyCreateTeamPage from "../pages/MyCreateTeamPage.vue";
import CreateTeamPage from "../pages/CreateTeamPage.vue";
import UserNav from "../pages/UserNav.vue";
import UpdateTeamPage from "../pages/UpdateTeamPage.vue";
import RegisterPage from "../pages/RegisterPage.vue";
import MyTag from "../pages/MyTag.vue";

const routes = [
    { path: '/', redirect: '/login'},
    {
        path: "/inter",
        component: BasicLayout,
        children: [
            { path: "index", component: Index, title: "伙伴匹配" },
            { path: "team", component: TeamPage, title: "队伍列表" },
            { path: "user", component: UserNav, title: "用户导航" },
            { path: "search", component: SearchPage, title: "查询用户" },
            { path: "user/edit", component: UserEditPage, title: "编辑信息" },
            { path: "user/list", component: SearchPageResult, title: "搜索结果" },
            { path: "user/detail", component: UserPage, title: "用户信息" },
            { path: "user/myAddTeam", component: MyAddTeamPage, title: "我加入的队伍" },
            { path: "user/myCreateTeam", component: MyCreateTeamPage, title: "我创建的队伍" },
            { path: "user/createTeam", component:  CreateTeamPage, title: "创建队伍" },
            { path: "user/updateTeam", component:  UpdateTeamPage, title: "修改队伍" },
            { path: "user/myTag", component: MyTag, title: "我的标签" },
        ],
        redirect: '/inter/index'
    },
    { path: "/login", component: LoginPage },
    { path: "/register", component: RegisterPage},
];

export default routes;
